package cate.game.train.spice.msg;

import cate.common.annotation.OperationSetter;
import cate.common.table.d.GDOperation;
import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBTrain;
import easy.java.dev.note.NoteField;

@ClientMsg(title = "英雄穿星格の 请求")
@OperationSetter(GDOperation.SPICE_ON)
public class SpiceOnReq implements MsgInput {
    @NoteField(value = "英雄uid", detail = "要给哪一个英雄穿星格")
    public String heroUid;

    @NoteField(value = "星格uid", detail = "要穿的星格")
    public String spiceUid;

    @NoteField(value = "部位", detail = "要穿的部位")
    public byte pos;

    @Override
    public void execute(GameBody game, ClientContext cc) {
       game.train.spice.on(cc.getRole(), spiceUid, heroUid, pos);
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBTrain.HERO_SPICE_ON_REQ;
    }
}
